/*
 * utils.h
 *
 *  Created on: Jan 5, 2009
 *      Author: yospaly
 */

#ifndef UTILS_H_
#define UTILS_H_

#include <wx/hashmap.h>
#include <wx/arrstr.h>

WX_DECLARE_STRING_HASH_MAP(wxString, StringHash);
WX_DECLARE_STRING_HASH_MAP(int, IntegerHash);
WX_DECLARE_STRING_HASH_MAP(wxArrayString, ArrayStringHash);

#define CYGWIN_INFO_CYGNUS_REGISTRY_NAME _T("Cygnus Solutions")
#define CYGWIN_INFO_CYGWIN_REGISTRY_NAME _T("Cygwin")
#define CYGWIN_INFO_CYGWIN_SETUP_REGISTRY_NAME _T("setup")
#define CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME _T("mounts v2")
#define CYGWIN_INFO_CYGDRIVE_FLAGS _T("cygdrive flags")
#define CYGWIN_INFO_CYGDRIVE_PREFIX _T("cygdrive prefix")
#define CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX _T("/cygdrive")
#define CYGWIN_INFO_CYGWINDLL_PATH _T("/bin/cygwin1.dll")

#define CYGWIN_INSTALLED_DB_PATH _T("/etc/setup/installed.db")
#define CYGWIN_INSTALLED_LST_DIR _T("/etc/setup/")

#define SYMLINK_COOKIE _T("!<symlink>")

// wxString format_size(size_t s);
wxString format_size(double s);
wxString format_size_str(const wxString& size);
int version_compare(const wxString& a, const wxString& b);

wxArrayString get_lock_file_processes(const wxString& file);

// split string to wxArrayString
wxArrayString split_string_ws(const wxString& string);

extern "C" void make_link_2(const wxChar* exepath, const wxChar* args, 
		const wxChar* icon, const wxChar* lname);

extern "C" int mkcygsymlink (const wxChar* from, const wxChar* to);

#endif /* UTILS_H_ */
